home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Mag HDD Backup
/
Amiga Mag HDD Backup.zip
/
Amiga Mag HDD Backup
/
Alexander.img.bin
/
Alexander.img
/
tech 4.1 editorial Archive.sit
/
Steichen
/
PasteUp.help
< prev
next >
Wrap
Text File
|
1993-07-26
|
9KB
|
239 lines
General PasteUp⌐áInformation
PasteUp⌐ is a collection of file manipulation utilities that are
useful for cutting & pasting lines of text, removing & replacing
a word that occurs throughout a file, or getting information
about a file's contents. PasteUp⌐ also has an ARexx⌐ interface
that allows the user to use PasteUp⌐ in ARexx⌐ programs. PasteUp⌐
will not allow you to over-write an existing file or leave without
giving you a chance to save your work. This is NOT true however,
for those that use PasteUp⌐ from ARexx⌐ programs! PasteUp⌐ was
written & tested by Jim Steichen using CanDo⌐ V2.01. I wrote
PasteUp⌐ because the commands it contains are some that I use freq-
uently in writing new programs from old fragments. The commands
were written in C & are only available from the CLI or other shell.
This Graphical-User-Interface makes them much easier to use!
File_Information
The Information window allows the user to obtain two basic kinds of
information about a file:
1. Findword: returns the line numbers & the lines that contain
the word entered into the 'Word:' gadget in the
window.
2. Fileinfo: returns the number of lines, words, characters &
pages contained in a text file.
Goto_Alterations
This button will change the window of PasteUp⌐ to the Alterations window.
Information_Menus
There are two menu selections available to the user in the Infor-
mation window:
1. Save Results (A-S) Saves the contents of the 'Command Results'
list gadget in a filename that the user
supplies.
2. Quit! (A-Q) Exits PasteUp⌐.
File_Alteration
NOTE: The user can edit the 'Command Results' list gadget contents before
saving them to the out file name.
The Alteration window allows the user to:
1. remove StartLine_# EndLine_# InputFile
Removes entire lines from the InputFile Starting at
StartLine_# & stopping at EndLine_#.
2. extract StartLine_# EndLine_# InputFile
Gets entire lines from the InputFile Starting at StartLine_#
& stopping at EndLine_#.
3. insert StartLine_# InsertFile DestinationFile
Inserts the contents of InsertFile into DestinationFile
beginning at StartLine_# of the DestinationFile.
4. delete DeleteWord InputFile
Deletes every occurance of 'DeleteWord' in the InputFile.
5. replace DeleteWord ReplaceWord InputFile
Deletes every occurance of 'DeleteWord' in the InputFile &
replaces them with 'ReplaceWord'.
Get_Info
This button will change the PasteUp⌐ window to the Information window.
Alteration_Menu
There is only a 'Quit!' (A-Q) menu selection available in the Alter-
ation window. It allows the user to exit PasteUp⌐ from the Alter-
ation window.
PasteUp_Help
There is no manual for PasteUp⌐, since the entire program is described
in the on-line help window. Feel free to print out PasteUp.help if
you need to refer to it often. This shouldn't be necessary since
the things that PasteUp⌐ does are fairly straightforward. Click on
a word in 'Help Index' or type it into the 'Search For:' gadget in
order to see the help entry about the word in 'Help Information'.
ARexx
PasteUp⌐ has an ARexx⌐ interface that does everything that the user
can do with PasteUp⌐ albeit in a slightly different fashion. After
all, if the user doesn't want to sit & assist the computer in
operating PasteUp⌐, then PasteUp⌐ has to run in an entirely auto-
mated fashion! See TestPasteUp.rexx for a good example on how to use
all the available ARexx⌐ácommands inside PasteUp⌐. The following
commands for PasteUp⌐ are available to ARexx⌐ programs:
NoDisplay This command simply pushes the PasteUp⌐ screen to the
back of all other open screens.
Quit This command shuts down PasteUp⌐ completely.
GotoInformation This command changes the PasteUp⌐ display to the
Information window.
GotoAlteration This command changes the PasteUp⌐ display to the
Alteration window.
FindWord_ARexx
findword word filename This command finds all occurances of 'word'
in filename & saves them in a file called
FindWord.txt in the following format:
Line#: Text line of inputfile that contains 'word'.
FileInfo_ARexx
fileinfo filename [page_size] This command returns an information
string about the filename in the
following format:
# lines: xx, # words: xx, # char's: xx, # pages: xx
NOTE: The number of pages depends on the page_size number you
supply. This number has to be greater than 0
(Default: 66).
Remove_ARexx
remove Start_# End_# InputFile OutputFile This command removes
entire lines from the
InputFile starting at Start_# & ending at End_#. The result is
written into OutputFile.
Extract_ARexx
extract Start_# End_# InputFile OutputFile This command extracts
entire lines from the
InputFile & writes them to OutputFile. InputFile remains
unaltered.
Insert_ARexx
insert Start_# InsertFile DestinationFile OutputFile This
command
inserts the InsertFile after the line Start_# in the
DestinationFile. The result is written to OutputFile.
Delete_ARexx
delete word InputFile OutputFile This command deletes all occur-
ances of 'word' in the InputFile
& writes the remainder to the OutputFile.
Replace_ARexx
replace old_word new_word InputFile OutputFile This command removes
all occurances of
'old_word' from the InputFile & replaces them with 'new_word'.
The results are written to OutputFile.
FindWord - In order to use this button, the user supplies a word to
search for & a filename to search in. It finds all
occurances of the search word in filename & shows them in
'Command Results' in the following format:
Line#: Text line of inputfile that contains 'word'.
FileInfo - In order to use this button, the user supplies a filename &
optionally supplies a number in 'PageLen' (> 0!). A string
about the filename is written to 'Command Results' in the
following format:
# lines: xx, # words: xx, # char's: xx, # pages: xx
NOTE: The number of pages depends on the PageLen number you
supply. This number has to be greater than 0
(Default: 66).
Remove - In order to use this button, the user must supply a starting
line #, an ending line # & an Input File name. Once the
button is released, entire lines are deleted from the
InputFile starting at Start_# & ending at End_#.
NOTE: Simply click on the desired starting line in the
'Source Text' list & the starting line # will be
written into 'Start #:'; clicking again will write
the ending line # into 'End #:'. Make sure that
the ending line # is greater than the starting line #!
Extract - In order to use this button, the user must supply a starting
line #, an ending line # & an Input File name. Once the
button is released, entire lines are copied to 'Command Results'
from the 'Source Text', starting at Start_# & ending at End_#.
The 'Source Text' will be unaltered after the operation.
NOTE: Simply click on the desired starting line in the
'Source Text' list & the starting line # will be
written into 'Start #:'; clicking again will write
the ending line # into 'End #:'. Make sure that
the ending line # is greater than the starting line #!
Insert - In order to use this button, the user must supply a starting
number in 'Start #:' & a Destination filename in 'Input File:'.
PasteUp⌐ will query the user for the insert filename that it
needs to perform the command.
Delete - In order to use this button, the user must supply a word to
delete (in 'Old Text') & a filename to delete them from.
Delete will remove all occurances of the word in the file &
place the results in 'Command Results'.
Replace - In order to use this button, the user must supply a word to
delete (in 'Old Text'), a word to insert (in 'New Text') & a
filename. PasteUp⌐ replaces all occurances of
'Old Text' from the file & replaces them with 'New Text'.